<template>
  <div class="sharePage">
    <div v-if="text" class="outBox">
      <h3>{{ text.title }}</h3>
      <div class="sendTime">{{ text.sendTime }}</div>
      
      <div v-html="text.content"></div>
    </div>
  </div>
</template>

<script>
import { getShareData } from "../../api/index-api";
export default {
  name: "SharePage",
  data() {
    return {
      text: null, //文章
    };
  },
  created() {
    console.log(this.$route.query.id);
    getShareData(this.$route.query.id).then((res) => {
      console.log(res);
      this.text = res.data;
    });
  },
};
</script>
<style lang="less" scoped>
.sharePage{
    overflow: hidden;
}
h3 {
  text-align: center;
}
.sendTime {
  text-align: center;
}
.outBox{
        padding: 0 10px;
}
img{
    width: 100%;
}
</style>